Optimal. Leaf size=83 \[ -\frac {a^5 x^{-n}}{n}+\frac {10 a^3 b^2 x^n}{n}+\frac {5 a^2 b^3 x^{2 n}}{n}+\frac {5 a b^4 x^{3 n}}{3 n}+\frac {b^5 x^{4 n}}{4 n}+5 a^4 b \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {272, 45}
\begin {gather*} -\frac {a^5 x^{-n}}{n}+5 a^4 b \log (x)+\frac {10 a^3 b^2 x^n}{n}+\frac {5 a^2 b^3 x^{2 n}}{n}+\frac {5 a b^4 x^{3 n}}{3 n}+\frac {b^5 x^{4 n}}{4 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rubi steps
\begin {align*} \int x^{-1-n} \left (a+b x^n\right )^5 \, dx &=\frac {\text {Subst}\left (\int \frac {(a+b x)^5}{x^2} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (10 a^3 b^2+\frac {a^5}{x^2}+\frac {5 a^4 b}{x}+10 a^2 b^3 x+5 a b^4 x^2+b^5 x^3\right ) \, dx,x,x^n\right )}{n}\\ &=-\frac {a^5 x^{-n}}{n}+\frac {10 a^3 b^2 x^n}{n}+\frac {5 a^2 b^3 x^{2 n}}{n}+\frac {5 a b^4 x^{3 n}}{3 n}+\frac {b^5 x^{4 n}}{4 n}+5 a^4 b \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 73, normalized size = 0.88 \begin {gather*} -\frac {12 a^5 x^{-n}-120 a^3 b^2 x^n-60 a^2 b^3 x^{2 n}-20 a b^4 x^{3 n}-3 b^5 x^{4 n}-60 a^4 b \log \left (x^n\right )}{12 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 80, normalized size = 0.96
method | result | size |
risch | \(5 a^{4} b \ln \left (x \right )+\frac {b^{5} x^{4 n}}{4 n}+\frac {5 a \,b^{4} x^{3 n}}{3 n}+\frac {5 a^{2} b^{3} x^{2 n}}{n}+\frac {10 a^{3} b^{2} x^{n}}{n}-\frac {a^{5} x^{-n}}{n}\) | \(80\) |
norman | \(\left (5 a^{4} b \ln \left (x \right ) {\mathrm e}^{n \ln \left (x \right )}-\frac {a^{5}}{n}+\frac {b^{5} {\mathrm e}^{5 n \ln \left (x \right )}}{4 n}+\frac {5 a \,b^{4} {\mathrm e}^{4 n \ln \left (x \right )}}{3 n}+\frac {5 a^{2} b^{3} {\mathrm e}^{3 n \ln \left (x \right )}}{n}+\frac {10 a^{3} b^{2} {\mathrm e}^{2 n \ln \left (x \right )}}{n}\right ) {\mathrm e}^{-n \ln \left (x \right )}\) | \(98\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 79, normalized size = 0.95 \begin {gather*} 5 \, a^{4} b \log \left (x\right ) + \frac {b^{5} x^{4 \, n}}{4 \, n} + \frac {5 \, a b^{4} x^{3 \, n}}{3 \, n} + \frac {5 \, a^{2} b^{3} x^{2 \, n}}{n} + \frac {10 \, a^{3} b^{2} x^{n}}{n} - \frac {a^{5}}{n x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 75, normalized size = 0.90 \begin {gather*} \frac {60 \, a^{4} b n x^{n} \log \left (x\right ) + 3 \, b^{5} x^{5 \, n} + 20 \, a b^{4} x^{4 \, n} + 60 \, a^{2} b^{3} x^{3 \, n} + 120 \, a^{3} b^{2} x^{2 \, n} - 12 \, a^{5}}{12 \, n x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 428 vs.
\(2 (73) = 146\).
time = 14.02, size = 428, normalized size = 5.16 \begin {gather*} \begin {cases} a^{5} x + 5 a^{4} b \log {\left (x \right )} - \frac {10 a^{3} b^{2}}{x} - \frac {5 a^{2} b^{3}}{x^{2}} - \frac {5 a b^{4}}{3 x^{3}} - \frac {b^{5}}{4 x^{4}} & \text {for}\: n = -1 \\\left (a + b\right )^{5} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {12 a^{5} n}{12 n^{2} x^{n} + 12 n x^{n}} - \frac {12 a^{5}}{12 n^{2} x^{n} + 12 n x^{n}} - \frac {60 a^{4} b n x^{n} \log {\left (x^{- n} \right )}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {60 a^{4} b n x^{n}}{12 n^{2} x^{n} + 12 n x^{n}} - \frac {60 a^{4} b x^{n} \log {\left (x^{- n} \right )}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {120 a^{3} b^{2} n x^{2 n}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {120 a^{3} b^{2} x^{2 n}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {60 a^{2} b^{3} n x^{3 n}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {60 a^{2} b^{3} x^{3 n}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {20 a b^{4} n x^{4 n}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {20 a b^{4} x^{4 n}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {3 b^{5} n x^{5 n}}{12 n^{2} x^{n} + 12 n x^{n}} + \frac {3 b^{5} x^{5 n}}{12 n^{2} x^{n} + 12 n x^{n}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.28, size = 75, normalized size = 0.90 \begin {gather*} \frac {60 \, a^{4} b n x^{n} \log \left (x\right ) + 3 \, b^{5} x^{5 \, n} + 20 \, a b^{4} x^{4 \, n} + 60 \, a^{2} b^{3} x^{3 \, n} + 120 \, a^{3} b^{2} x^{2 \, n} - 12 \, a^{5}}{12 \, n x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.52, size = 79, normalized size = 0.95 \begin {gather*} 5\,a^4\,b\,\ln \left (x\right )-\frac {a^5}{n\,x^n}+\frac {b^5\,x^{4\,n}}{4\,n}+\frac {5\,a^2\,b^3\,x^{2\,n}}{n}+\frac {5\,a\,b^4\,x^{3\,n}}{3\,n}+\frac {10\,a^3\,b^2\,x^n}{n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________